package com.sun.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.sun.model.TbBrand;
import com.sun.service.TbBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author sun
 * @create 2020-10-09 22:17
 */
@Controller
@RequestMapping("/tbBrand")
public class TbBrandController {
    @Reference
    private TbBrandService tbBrandService;

    @RequestMapping("/findAllTbBrand")
    @ResponseBody
    public List<TbBrand> findAllTbBrand() {
        List<TbBrand> allTbBrand = tbBrandService.findAllTbBrand();
        System.out.println("------->数据--"+allTbBrand);
        return allTbBrand;
    }
}
